package com.woniu.car.parameter;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * Description:
 * date: 2021/6/23 19:36
 *
 * @author zhoubinbin
 * @since
 */
@ApiModel("新增收货地址参数对象")
@Data
public class ReceiverParam {
    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细收获地址",required = true,example = "碧桂园10栋301")
    @NotBlank(message = "详细地址不能为空")
    private String address;

    /**
     * 省份
     */
    @ApiModelProperty(value = "省份",required = true,example = "四川")
    @NotBlank(message = "省份不能为空")
    private String province;

    /**
     * 城市
     */
    @ApiModelProperty(value = "城市",required = true,example = "成都")
    @NotBlank(message = "城市不能为空")
    private String city;

    /**
     * 区域/县
     */
    @ApiModelProperty(value = "区域/县城",required = true,example = "武侯区")
    @NotBlank(message = "区域/县不能为空")
    private String district;

    /**
     * 收货人
     */
    @ApiModelProperty(value = "收货人",required = true,example = "吴某某")
    @NotBlank(message = "收货人不能为空")
    private String consignee;

    /**
     * 收货人电话
     */
    @ApiModelProperty(value = "收货人电话",required = true,example = "16767676767")
    @NotBlank(message = "收货人电话不能为空")
    @Pattern(regexp = "^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$",message = "请输入正确的中国大陆手机号")
    private String phone;

    /**
     * 邮政编码
     */
    @ApiModelProperty(value = "邮政编码",required = true,example = "675614")
    @NotBlank
    @Pattern(regexp = "^[0-9]{6}$",message = "请输入正确的6位邮政编码")
    private String zipCode;

}
